<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>货品出库明细管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/ka/productOutDetail/">货品出库明细列表</a></li>
		<li class="active"><a href="${ctx}/ka/productOutDetail/form?id=${productOutDetail.id}">货品出库明细修改列表</a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="productOutDetail" action="${ctx}/ka/productOutDetail/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>		
		<div class="control-group">
			<label class="control-label">货号：</label>
			<div class="controls">
				<form:input path="productCode" htmlEscape="false" maxlength="64" class="input-xlarge required" readonly="true"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">供应商：</label>
			<div class="controls">
				<form:select path="supplierId" class="input-medium required" disabled="true">
					<form:option value="" label=""/>
					<form:options items="${fns:getSupplier()}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">品类：</label>
			<div class="controls">
				<form:select path="categoryId" class="input-medium required">
					<form:option value="" label=""/>
					<form:options items="${fns:getCategory() }" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">尺寸：</label>
			<div class="controls">
				<form:select path="sizeId" class="input-medium required">
					<form:option value="" label=""/>
					<form:options items="${fns:getSize() }" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
			<div class="control-group">
			<label class="control-label">颜色：</label>
			<div class="controls">
				<form:select path="colorId" class="input-medium required">
					<form:option value="" label=""/>
					<form:options items="${fns:getColor() }" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">出库时间：</label>
			<div class="controls">
				<input name="outstockDate" type="text" maxlength="20" class="input-medium Wdate required"
					value="<fmt:formatDate value="${productOutDetail.outstockDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">入库价格：</label>
			<div class="controls">
				<form:input path="instockPrice" htmlEscape="false" maxlength="7" class="input-xlarge required" readonly="true" />元
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">出库价格：</label>
			<div class="controls">
				<form:input path="outstockPrice" htmlEscape="false" maxlength="7" class="input-xlarge required number" />元
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">销售价格：</label>
			<div class="controls">
				<form:input path="salesPrice" htmlEscape="false" maxlength="7" class="input-xlarge required number" />元
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">活动优惠：</label>
			<div class="controls">
				<form:input path="activePrice" htmlEscape="false" maxlength="7" class="input-xlarge required number" />元
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">实际销售价格：</label>
			<div class="controls">
				<form:input path="realPrice" htmlEscape="false" maxlength="7" class="input-xlarge required number" />元
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">退货订单号：</label>
			<div class="controls">
				<form:input path="orderNumber" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">退货快递公司：</label>
			<div class="controls">
				<form:select path="carrierId" class="input-medium">
					<form:options items="${fns:getCarrier()}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">渠道：</label>
			<div class="controls">
				<form:select path="canalId" class="input-medium required">
					<form:options items="${fns:getCanal() }" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">退货快递单号：</label>
			<div class="controls">
				<form:input path="waybillNumber" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">库位号：</label>
			<div class="controls">
				<form:input path="gridNo" htmlEscape="false" maxlength="32" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">数量：</label>
			<div class="controls">
				<form:input path="amount" htmlEscape="false" maxlength="5" class="input-xlarge required digits"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="form-actions">
			<shiro:hasPermission name="ka:productOutDetail:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>